package com.example.gobang_system.service.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum MatchStatusEnum {
    START(1, "开始匹配"),
    STOP(2, "停止匹配"),
    SUCCESS(3, "匹配成功");

    private final Integer code;
    private final String message;

    public static MatchStatusEnum forName(String name) {
        for (MatchStatusEnum matchStatus : MatchStatusEnum.values()) {
            if (matchStatus.name().equalsIgnoreCase(name)) {
                return matchStatus;
            }
        }
        return null;
    }
}
